#ifndef TILEMAP_H_INCLUDED
#define TILEMAP_H_INCLUDED

#include <SFML/Graphics.hpp>
#include <vector>
#include "tile.h"

class TileMap : public sf::Drawable, public sf::Transformable
{

private:

    sf::VertexArray m_vertices;
    sf::Texture m_tileset;

public:
    TileMap();
    bool load(const std::string& tileset, sf::Vector2u tileSize, std::vector<tile*> tiles, unsigned int width, unsigned int height);
    void resetTileMap();

private:

    int width;
    int height;
    std::vector<tile*> tiles;
    sf::Vector2u tileSize;
    virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const;

};

#endif // TILEMAP_H_INCLUDED
